<h1>Cargar título</h1>
<form id="form1" name="form1" method="post" action="insert" enctype="multipart/form-data">
  <table width="489" border="0" align="left">
      <tr>
        <td width="162" align="left">Título</td>
        <td width="317" align="left"><span id="sprytextfield1">
          <input type="text" name="txtTitulo" id="txtTitulo" />
          <span class="textfieldRequiredMsg">Se necesita un valor.</span></span></td>
      </tr>
      <tr>
        <td align="left">Editorial</td>
        <td align="left"><label for="ddlEditorial"></label>
          <select name="ddlEditorial" id="ddlEditorial">
            <?php
              foreach ($editoriales_query as $key ) {
                if($key['estado'] == 1)
                 echo '<option value ="'.$key['idEditorial'].'">'.$key['descripcion'].'</option>';
               } 
            ?>
          </select></td>
      </tr>
      <tr>
            
        <td align="left">Idioma</td>
        <td align="left"><label for="ddlIdioma"></label>
          <select name="ddlIdioma" id="ddlIdioma">
          <?php
              foreach ($idiomas_query as $key ) {
                if($key['estado'] == 1)
                 echo '<option value ="'.$key['idIdioma'].'">'.$key['descripcion'].'</option>';
               } 
          ?>
          </select></td>
      </tr>
      <tr>
        <td align="left">Institucion</td>
        <td align="left"><label for="ddlInstitucion"></label>
          <select name="ddlInstitucion" id="ddlInstitucion">
             <?php
              foreach ($instituciones_query as $key ) {
                if($key['estado'] == 1)
                 echo '<option value ="'.$key['idInstitucion'].'">'.$key['descripcion'].'</option>';
               } 
             ?>
          </select></td>
      </tr>
      <tr>
        <td align="left">Lugar de publicación</td>
        <td align="left"><label for="txtLugarpublicacion"></label>
          <span id="sprytextfield2">
          <input type="text" name="txtLugarpublicacion" id="txtLugarpublicacion" />
          <span class="textfieldRequiredMsg">Se necesita un valor.</span></span></td>
      </tr>
      <tr>
        <td align="left">Nº de edición</td>
        <td align="left"><label for="txtNedicion"></label>
          <span id="sprytextfield3">
          <input type="text" name="txtNedicion" id="txtNedicion" />
          <span class="textfieldRequiredMsg">Se necesita un valor.</span><span class="textfieldInvalidFormatMsg">Solo se aceptan números.</span></span></td>
      </tr>
      <tr>
        <td align="left">Año de edición</td>
        <td align="left"><select name="ddlAnio" id="ddlAnio">
          <?php for($i = 2050; $i>=1950; $i--)
                      echo "<option value='".$i."'>".$i."</option>";
            ?>
</select></td>
      </tr>
      <tr>
        <td align="left">ISBN</td>
        <td align="left"><label for="txtISBN"></label>
          <span id="sprytextfield4">
          <input type="text" name="txtISBN" id="txtISBN" />
          <span class="textfieldRequiredMsg">Se necesita un valor.</span><span class="textfieldInvalidFormatMsg">Solo se aceptan números.</span></span></td>
      </tr>
      <tr>
        <td align="left">Páginas</td>
        <td align="left"><label for="txtPaginas"></label>
          <span id="sprytextfield5">
          <input type="text" name="txtPaginas" id="txtPaginas" />
          <span class="textfieldInvalidFormatMsg">Solo se aceptan números.</span>          </span></td>
      </tr>
      <tr>
        <td align="left">Descriptores</td>
        <td align="left"><textarea name="taDescriptores" cols="30" rows="3" id="taDescriptores"></textarea></td>
      </tr>
      <tr>
        <td align="left">Notas</td>
        <td align="left"><label for="taNotas"></label>
          <textarea name="taNotas" id="taNotas" cols="30" rows="3"></textarea></td>
      </tr>
      <tr>
        <td align="left">Tapa</td>
        <td align="left"><label for="userfile"></label>
          <input type="file" name="userfile" id="userfile" /></td>
      </tr>
      <tr>
        <td align="left">Incluye software</td>
        <td align="left"><input type="checkbox" name="cbSoftware" id="cbSoftware" />
          <label for="cbSoftware"></label></td>
      </tr>
      <tr>
        <td align="left">Autores</td>
        <td align="left"><label for="ddlAutores"></label>
          <select name="ddlAutores[]" size="3" multiple="multiple" id="ddlAutores">
             <?php
              foreach ($autores_query as $key ) {
                 if($key['estado'] == 1)
                 echo '<option value ="'.$key['idAutor'].'">'.$key['nombre'].' '.$key['apellido'].'</option>';
               } 
             ?>
          </select></td>
      </tr>
      <tr>
        <td align="left">Carreras</td>
        <td align="left"><label for="ddlCarreras"></label>
          <select name="ddlCarreras[]" size="3" multiple="multiple" id="ddlCarreras">
              <?php
              foreach ($carreras_query as $key ) {
                 if($key['estado'] == 1)
                 echo '<option value ="'.$key['idCarrera'].'">'.$key['descripcion'].'</option>';
               } 
             ?>
          </select></td>
      </tr>
      <tr>
        <td align="left">&nbsp;</td>
        <td align="left"><input type="hidden" id="txtOculto" value="false" name="txtOculto"></td>
      </tr>
      <tr>
        <td align="left">&nbsp;</td>
        <td align="left"><input type="submit" name="btnGuardar" id="btnGuardar" value="Guardar">&nbsp;&nbsp;&nbsp;&nbsp;<span id="SpanBoton"></span></td>
      </tr>
    </table>
</form>
